home *** CD-ROM | disk | FTP | other *** search
-
- /********************************************
- **** Animation Class Library V1.0 © 1994 Yves Schmid & Alia Development
- ****
- **** AnimControl.h
- ****
- **** Created: 19 May 1994
- **** Modified: 01 Septembre 1994
- **** Version: 0
- **** Compatible: C++, Mac System 7
- ****
- **** Description: Definitions for control commands.
- ****
- ****
- *******************/
-
-
- #ifndef AnimControl_H
- #define AnimControl_H
-
-
- #include "CoreHead.h"
-
-
- class AnimCObject;
-
- //................................
- // Build a linked list with AnimControl structures (ended with "next"=NULL) and
- // pass it to an Anim object.
-
-
- struct AnimControl
- {
- short cmd; // Command
- float x,y; // Coordinates
- float cx,cy; // For curves
- float speed; // Speed in pixels
- float acceleration; // Acceleration in pixels
- long sequence; // A sequence number
- long wait; // Wait value
- unsigned long data; // Data
- AnimControl *next; // A pointer on the next AnimControl or NULL.
- // You can create a loop by pointing next to a
- // previous command.
-
- unsigned long userID; // Use this entry like you want
-
- void (*endproc)(AnimCObject*, AnimControl*); // NULL or a pointer on a function
- // which is called after the
- // command has been executed.
- // Your function receives
- // a pointer on the Anim object and
- // a pointer to the AnimControl
- // structure. You can modify
- // the "next" field in your
- // function before returning. It
- // allows you do interactive control.
-
- Boolean (*testproc)(AnimCObject*, AnimControl*); // NULL or a pointer on a function
- // which is called before executing
- // control. If your function returns
- // FALSE the control is not executed.
- };
-
- //*****************************
- // Commands:
-
-
- // General
-
- const short acmd_null = 0; // NULL command (synchronous)
-
- const short acmd_place = 10; // Places the object to a new position. Specify
- // the position with the x/y field of the
- // control. Same as the "place" method. (synchronous).
- // Sets oldx and oldy to the previous position.
-
- const short acmd_move = 11; // Places the object to a new position using deltas. Specify
- // the deltas with the x/y field of the
- // control. Same as the "move" method. (synchronous).
- // Sets oldx and oldy to the previous position.
-
- const short acmd_goto = 12; // Starts to move the object. The object will go to
- // the position specified in x/y using the speed and
- // the acceleration. (asynchronous).
- // Oldx and oldy contain always the previous position.
-
- const short acmd_curve = 13; // Same as acmd_goto but does a curve which passes by
- // cx/cy before going to x/y. (asynchronous).
- // Oldx and oldy contain always the previous position.
-
- const short acmd_wait = 14; // Waits. You must specify the number of ticks to wait
- // in the "wait" variable of the AnimControl. (asynchronous).
-
- const short acmd_delete = 15; // Deletes the animation object at next update (synchronous).
-
- const short acmd_setsortflags = 16; // Sets the current sorting flags of the AnimBase which
- // controls this object. Use the "data" field to
- // specify flags. (synchronous)
-
- const short acmd_setpriority = 17; // Changes the sorting priority. Use the "data" field to
- // specify flags. (synchronous).
-
- // Anim Class commands:
-
-
- const short acmd_setanimflags = 18; // Sets the animation flags. Use the "data" field to
- // specify flags.(synchronous).
-
- const short acmd_setsequence = 19; // Sets a new sequence. Use the "sequence" field to
- // specify the sequence. (synchronous).
-
- const short acmd_waitframe = 20; // Waits for a frame. You specify the frame number in the
- // "wait" variable. (asynchronous).
-
- const short acmd_waitnframes = 21; // Waits a number of frames. You specify the frame number in the
- // "wait" variable. (asynchronous).
-
- #endif
-
-